package com.dpiinc.TechPage.room.bean
import androidx.room.Entity
import androidx.room.Index
import androidx.room.PrimaryKey
import androidx.room.TypeConverters
import com.dpiinc.TechPage.model.FileBean
import com.dpiinc.TechPage.model.ImagesBean
import com.dpiinc.TechPage.room.AiWriteTypeConverters
import com.dpiinc.TechPage.utils.DateUtils
import java.io.Serializable

/**
 * 笔记
 */
@Entity(tableName = "notes",
        indices = [(Index(value = ["noteId"], unique = true))])
@TypeConverters(AiWriteTypeConverters::class)
data class NoteEntity(
        @PrimaryKey
        var noteId: String//笔记唯一ID
) : Serializable {
    var noteName: String? = null//笔记名称
    var createTime: Long = DateUtils.getCurrentTimeMillis()//创建时间
    var modifyTime: Long = DateUtils.getCurrentTimeMillis()//修改时间
    var dotFiles: FileBean? = null//原始数据
    var label: List<LabelEntity>? = null//标签
    var recordFiles: List<FileBean>? = null//录音文件地址
    var imageFiles: ImagesBean? = null//图片文件
//    var state: Int = 0
}